<div class="sidecon left">
  <div class="side-user">
    <div class="avatar"><a href="{AnUrl('home')}" alt="个人中心" title="个人中心"><img src="{user_helper::avatar(user_helper::get_user_id())}"></a></div>
    <h4 class="name">{user_helper::get_nick_name(0)}</h4>
  </div>
  <div class="sidemenu sidemenu2 js_homeSider">
    <div class="first js_siderTitle"><a href="javascript:void(0);"><em></em>我的订单</a></div>
    <ul class="level1 js_siderUl hide">
      <li class="js_currLI {if get_module_name() == 'order'}curr{/if}">
        <a href="javascript:void(0);"><em></em>订单管理</a>
        <ul class="level2 js_currLiParent">
         {$curr_action = get_action_title()}
          <li {if get_module_name() == 'order' && !is_numeric($curr_action)}class="siderInLi curr"{/if}><a href="{AnUrl('order')}">已购买商品</a></li>
          <li {if get_module_name() == 'order' && $curr_action == 1}class="siderInLi curr"{/if}><a href="{AnUrl('order/1')}">待支付订单</a></li>
          <li {if get_module_name() == 'order' && $curr_action == 2}class="siderInLi curr"{/if}><a href="{AnUrl('order/2')}">已支付订单</a></li>
          <li {if get_module_name() == 'order' && $curr_action == 4}class="siderInLi curr"{/if}><a href="{AnUrl('order/4')}">已完成订单</a></li>
          <li {if get_module_name() == 'order' && $curr_action == 5}class="siderInLi curr"{/if}><a href="{AnUrl('order/5')}">已关闭订单</a></li>
        </ul>
      </li>
    </ul>
    <div class="first js_siderTitle {if get_module_name() == 'fav'}curr{/if}"><a href="{AnUrl('fav')}"><em></em>我的最爱</a></div>
    <div class="first js_siderTitle {if get_module_name() == 'coupon'}curr{/if}"><a href="{AnUrl('coupon')}"><em></em>我的优惠券</a></div>
    <div class="first js_siderTitle"><a href="javascript:void(0);"><em></em>个人设置</a></div>
    <ul class="level1 js_siderUl hide">
      <li class="js_currLI {if get_module_name() == 'user'}curr{/if}">
        <a href="javascript:void(0);"><em></em>基本设置</a>
        <ul class="level2 js_currLiParent">
          <li {if get_module_name() == 'user' && get_action_title() == 'index'}class="siderInLi curr"{/if}><a href="{AnUrl('user/setting')}">基本信息</a></li>
          <li {if get_action_title() == 'avatar'}class="siderInLi curr"{/if}><a href="{AnUrl('user/setting/avatar')}">头像修改</a></li>
          <li {if get_action_title() == 'password'}class="siderInLi curr"{/if}><a href="{AnUrl('user/setting/password')}">安全中心</a></li>
          <li {if get_action_title() == 'account_bind'}class="siderInLi curr"{/if}><a href="{AnUrl('user/setting/account_bind')}">登录绑定</a></li>
        </ul>
      </li>
      <li class="js_currLI {if get_module_name() == 'address'}curr{/if}"><a href="{AnUrl('address')}"><em></em>地址管理</a></li>
    </ul>
  </div>
  <!--end:sidemenu-->
</div>
<script>
$(function(){
  $('.js_currLI').click(function(e){
    if(e.target == this) {
      $(this).siblings().removeClass('curr');
      $(this).toggleClass('curr');
    }
  });
  $('.js_currLI a').click(function(){
    $(this).parent().toggleClass('curr');
  });
  $('.js_currLiParent').find('.curr').each(function(){
    $(this).parent().parent().parent().removeClass('hide');
  });
  $('.js_siderUl').children('.curr').each(function(){
    $(this).parent().removeClass('hide');
  });
  $('.js_siderTitle').click(function(){
    $('.js_siderUl').addClass('hide');
    $(this).next('ul').toggleClass('hide');
    $(this).next('ul').children().eq(0).addClass('curr');
  });
});
</script>